﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace Views
{
    /// <summary>
    /// WindowDialog.xaml 的交互逻辑
    /// </summary>
    public partial class WindowDialog : Grid
    {
        public WindowDialog()
        {
            InitializeComponent();
            Instance = this;
        }
        public static WindowDialog Instance;

        public void ShowDialog(Type type)
        {
            FrameworkElement element = (FrameworkElement)Activator.CreateInstance(type);
            this.Visibility = Visibility.Visible;
            this.Dialog.Children.Add(element);
        }
    }
}